﻿// 3. Write a method that returns the last digit of given integer as an English word. 
// Examples: 512 -> "two", 1024 -> "four", 12309 -> "nine".
using System;

class GetLastDigitMethod
{
    static void Main()
    {
        Console.Write("Enter your number, please : ");
        int number = int.Parse(Console.ReadLine());

        Console.WriteLine("The last digit of your number is : {0}", GetLastDigit(number));

    }

    static string GetLastDigit(int number)
    {
        int lastDigit = Math.Abs(number % 10);
        string strDigit;
        switch (lastDigit)
        {
            case 0: strDigit = "zero"; break;
            case 1: strDigit = "one"; break;
            case 2: strDigit = "two"; break;
            case 3: strDigit = "three"; break;
            case 4: strDigit = "four"; break;
            case 5: strDigit = "five"; break;
            case 6: strDigit = "six"; break;
            case 7: strDigit = "seven"; break;
            case 8: strDigit = "eight"; break;
            case 9: strDigit = "nine"; break;
            default: strDigit = ""; break;
        }
        return strDigit;
    }
}